package com.example.springbootmybatisdemo.config;

import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description 重写缓存管理器
 * @Author: cdd
 * @Date: 2020/7/1 10:21
 * @Version: 1.0
 */
@Component
public class ShiroRedisCacheManager implements CacheManager {

    @Resource
    private Cache shiroRedisCache;

    @Override
    public <K, V> Cache<K, V> getCache(String s) throws CacheException {
        return shiroRedisCache;
    }
}
